package com.dashunzi.yueyutianqi.base;

import android.app.Activity;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

import com.dashunzi.yueyutianqi.R;

/**
 * 主页下4个子页面的基类
 * Created by Administrator on 2016/4/10 0010.
 * 作者：大顺子
 */
public class BasePager {
    public Activity mActivity;
    public View mRootView;
    public FrameLayout flContent;

    /**
     * 通过构造函数将activity对象传递过来
     */
    public BasePager(Activity activity) {
        mActivity = activity;
        initViews();//初始化布局
        initview();
        initListener();
    }



    /**
     * 子类选择性实现，用于子类view的初始化
     */
    public void initview() {

    }

    /**
     * 初始化布局
     */
    private void initViews() {
        mRootView = View.inflate(mActivity, R.layout.base_pager, null);
        flContent = (FrameLayout) mRootView.findViewById(R.id.fl_content);
    }
    /**
     * 初始化数据
     */
    public void initData() {

    }

    /**
     * 初始化各类事件
     */
    public void initListener() {

    }
}
